Installation of "Select for Participants" into Choice activity Add file selecfor.php to root/mod/choice/ Add the following lines to root/lang/xx/choice.php: $string['selectfor'] = 'Select for Participants'; $string['savechoices'] = 'Save choices for participants'; $string['randomselect'] = 'Randomly assign participants'; $string['nochoice'] = 'No Choice'; $string['overlimit'] = 'One or more selections failed because the option would be over its limit.'; $string['selectionfailed'] = 'Can not assign $a to choice '; $string['notenoughspace'] = 'There are more participants than spaces available. Make adjustments and try again.'; Add the following code to root/mod/choice/view.php, near line 78 // existing code if (has_capability('mod/choice:readresponses', $context)) { choice_show_reportlink($allresponses, $cm); } // start new code -- add these lines if (has_capability('mod/choice:deleteresponses', $context)) { choice_show_selectfor_link($cm); } // end new code //existing code echo '
'; Add the following code to root/mod/choice/report.php, near line 206 // existing code exit; } // start new code -- add these lines if (has_capability('mod/choice:deleteresponses', $context) /* and $choice->showunanswered */) { choice_show_selectfor_link($cm); } // end new code //existing code choice_show_results($choice, $course, $cm, $users, $format); //show table with students responses. Add the following new function to root/mod/choice/lib.php function choice_show_selectfor_link($cm, $choice){ echo ''; } To do: 1) Change references to capability "deleteresponses" in selectfor.php, view.php and report.php to a new separate capability. 2) Work on logic for random distribution when some participants have already made a selection.